package tool;

import java.util.Random;

/**
 * ��������
 */
public class RandomPassword {
    public static void main(String[] args) {

        String password = makeRandomPassword(12);
        new CheckPassword(password);
        System.out.println(password);
//        password = makeRandomPassword(12);
//        new CheckPassword(password);
//        System.out.println(password);
//        password = makeRandomPassword(16);
//        new CheckPassword(password);
//        System.out.println(password);


    }

    //�����������
    public static String makeRandomPassword(int len){
        char charr[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~!@#$%^&*.?".toCharArray();
        StringBuilder sb = new StringBuilder();
        Random r = new Random();

        for (int x = 0; x < len; ++x) {
            sb.append(charr[r.nextInt(charr.length)]);
        }
        return sb.toString();
    }
}
